#ifndef CANCTRL_H
#define CANCTRL_H

#include <QObject>
#include "ControlCAN.h"

#define CANCtrlIns CANCtrl::Instance()

class CANCtrl : public QObject
{
    Q_OBJECT
public:
    explicit CANCtrl(QObject *parent = nullptr);

    static CANCtrl *Instance();

public:
    //初始化CAN通道
    bool initCAN(DWORD deviceType, DWORD deviceIndex, DWORD channel);
    //发送数据
    void sendCANData(DWORD deviceType, DWORD deviceIndex, DWORD channel, DWORD id, BYTE* data, DWORD len);
    //接受数据
    void receiveCANData(DWORD deviceType, DWORD deviceIndex, DWORD channel);

signals:
};

#endif // CANCTRL_H
